#pragma once
#include <d3dx9.h>


class Camera
{
public:
	Camera(void)
	{
		Init();
	}

	Camera(float posX, float posY, float posZ)
	{
		Init();
		CameraPosition = D3DXVECTOR3(posX,posY,posZ);

	}
	//~Camera(void);

	D3DXVECTOR3 CameraPosition; // position of the camera in the world
	D3DXVECTOR3 LookatPosition; // what this camera should be pointing at
	D3DXVECTOR3 UpVector; // up direction

	void Init()
	{
		// defaults
		CameraPosition = D3DXVECTOR3(0, 3, -5); 
		LookatPosition = D3DXVECTOR3(0,0,0); // origin
		UpVector = D3DXVECTOR3( 0.0f, 1.0f, 0.0f ); // Y axis is up
	}

	D3DXMATRIXA16 GetViewMatrix()
	{
		D3DXMATRIXA16 viewMatrix;
		D3DXMatrixLookAtLH(&viewMatrix,&CameraPosition,&LookatPosition,&UpVector);

		return viewMatrix;
	}



};
